package com.sum.common.bean;

import java.util.Objects;

/**
 * Session信息
 */
public class SessionInfo {
    private final String session;
    private final String flag;

    public SessionInfo(String session, String flag) {
        this.session = session;
        this.flag = flag;
    }

    public String getSession() { return session; }
    public String getFlag() { return flag; }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SessionInfo that = (SessionInfo) o;
        return Objects.equals(session, that.session) &&
                Objects.equals(flag, that.flag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(session, flag);
    }

    @Override
    public String toString() {
        return "SessionInfo{" +
                "session='" + session + '\'' +
                ", flag='" + flag + '\'' +
                '}';
    }
}